package com.petAdoption.manager.controller;


import com.petAdoption.manager.entity.Deliver;
import com.petAdoption.manager.entity.Neck;
import com.petAdoption.manager.mapper.NeckMapper;
import com.petAdoption.manager.service.INeckService;
import com.petAdoption.manager.util.Result;
import com.petAdoption.manager.vo.NeckVO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 王倩茹
 * @since 2023-08-28
 */
@RestController
@RequestMapping("/neck")
public class NeckController {
    @Resource
    private INeckService neckService;
    @Resource
    private Result result;

    @GetMapping("/findAll")
    public Result findAll(){
        List<NeckVO> list = neckService.findAll();
        if(list!=null && !list.isEmpty()){
            return result.success("查找成功",list);
        }
        return result.fail("查找失败");
    }


}
